﻿@{
    ViewBag.Title = "NYCYHLTQYNB";
    Layout = "~/Views/Shared/_LayoutChild.cshtml";
}
@section head {
    @if (false)
    {<script src="~/Scripts/jquery-1.6.4-vsdoc.js" type="text/javascript"></script>}
    @Html.Partial("_JqGrid")
    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.uploadify-3.1.js")"></script>
    <link href="@Url.Content("~/Content/uploadify/uploadify.css")"     rel="stylesheet" type="text/css" />
    <style type="text/css">
        table, table td, table th
        {
            border-collapse: collapse;
            font-size: 12px;
        }
        table
        {
            table-layout: fixed;
        }
        td
        {
            white-space: nowrap;
            display: table-cell;
            vertical-align: inherit;
        }
        .uploadify
        {
            margin-top: 4px;
            padding-top: 3px;
            padding-bottom: 0px;
            margin-bottom: 0px;
            border: #ccc 1px solid;
        }
        .uploadify-button
        {
            background-color: transparent;
            border: none;
            padding: 0;
        }
        .uploadify:hover .uploadify-button
        {
            background-color: transparent;
            border: none;
            padding: 0;
            margin-top: -6px;
        }
        .uploadbtn
        {
            width: 40px;
            height: 20px;
            background-color: transparent;
            border: none;
            padding: 0;
        }
        .uploadify-queue
        {
            left: 1px;
            top: 1px;
            width: 40px;
        }
    </style>
    <script language="javascript" type="text/javascript">
        var selectId = "";
        var flag1 = false, flag2 = false, flag3 = false, flag4 = false, flag5 = false, flag6 = false, flag7 = false;
        var gridId1 = "#tableId1", gridId2 = "#tableId2", gridId3 = "#tableId3", gridId4 = "#tableId4";
        var gridId5 = "#tableId5", gridId6 = "#tableId6", gridId7 = "#tableId7", activeGridId = gridId1;
        var edittype = '@ViewBag.edittype'; //0不可编辑，1可编辑
        var colModels1, colModels2, colModels3, colModels4, colModels5, colModels6, colModels7;
        var saveUrl = '/DataManage/Report/Save5000WReport/';
        var organization_type = '@ViewBag.Organization.Organization_Type';
        var organization_name = '@ViewBag.Organization.Organization_Name';
        var organization_id = '@ViewBag.Organization.Organization_ID';
        $(document).ready(function () {
            $("#tabs").tabs();
            $("#tabs ul li a").bind("click", function () {
                activeGridId = "#tableId" + $(this).attr("att");
            });
            funGridInit();
            colModels1 = JSON.stringify($(gridId1).getGridParam('colModel'));
            colModels2 = JSON.stringify($(gridId2).getGridParam('colModel'));
            colModels3 = JSON.stringify($(gridId3).getGridParam('colModel'));
            colModels4 = JSON.stringify($(gridId4).getGridParam('colModel'));
            colModels5 = JSON.stringify($(gridId5).getGridParam('colModel'));
            colModels6 = JSON.stringify($(gridId6).getGridParam('colModel'));
            colModels7 = JSON.stringify($(gridId7).getGridParam('colModel'));
            initUpload();
            if (edittype == "0") {
                $("#btnImport").css('display', 'none');
                $("#addRow").css('display', 'none');
                $("#delRow").css('display', 'none');
                $("#funSave").css('display', 'none');
            }
            //如果是龙头企业，则不能手动添加行，系统将自动为其添加一行
            if (organization_type == '1') {
                $("#addRow").css('display', 'none');
                $("#delRow").css('display', 'none');
                $("#ChooseExportType").css('display', 'none');
            }

            $("#titlediv").html(" 报表ID:" + '@ViewBag.SubmitInfoId');
        });

        function initUpload() {
            $("#btnImport").uploadify({
                'formData': { 'ASPSESSID': '@(Session.SessionID)', 'AUTHID': '@ViewBag.auth',
                    GUID: '@ViewBag.GUID', 'submitInfoId': '@ViewBag.SubmitInfoId',
                    'colModel1': colModels1,
                    'colModel2': colModels2,
                    'colModel3': colModels3,
                    'colModel4': colModels4,
                    'colModel5': colModels5,
                    'colModel6': colModels6,
                    'colModel7': colModels7
                },
                'multi': false,
                'auto': true,
                'swf': '/Content/uploadify/uploadify.swf',
                'uploader': '/DataManage/Report/importLTQYNB',
                'width': 60,
                'fileTypeExts': '*.xls',
                'height': 22,
                'buttonImage': '/Content/import.png',
                'onSelect': function (e, queueId, fileObj) { parent.$.cover(true); }, //选择文件后触发的事件。
                'onUploadSuccess': function (file, data, response) {
                    var _data = $.parseJSON(data);
                    if (!_data.Success) {
                        top.asyncbox.alert('导入数据失败!', '提示');
                        Search(); //重新加载grid
                        parent.$.cover(false);
                        return;
                    }
                    $(gridId1)[0].addJSONData(_data.Data.GridData1);
                    $(gridId2)[0].addJSONData(_data.Data.GridData2);
                    $(gridId3)[0].addJSONData(_data.Data.GridData3);
                    $(gridId4)[0].addJSONData(_data.Data.GridData4);
                    $(gridId5)[0].addJSONData(_data.Data.GridData5);
                    $(gridId6)[0].addJSONData(_data.Data.GridData6);
                    $(gridId7)[0].addJSONData(_data.Data.GridData7);

                    //判断龙头企业只能导入一行记录
                    var rowcount = $(gridId1).jqGrid('getGridParam', 'reccount');
                    if (organization_type == '1' && $(gridId1).jqGrid('getGridParam', 'reccount') > 1) {
                        top.asyncbox.alert('龙头企业只允许导入一行数据，导入失败!', '提示');
                        Search(); //重新加载grid
                        parent.$.cover(false);
                        return;
                    }
                    //判断各表记录数是否一致。
                    for (i = 2; i <= 7; i++) {
                        if ($("#tableId" + i).jqGrid('getGridParam', 'reccount') != rowcount) {
                            top.asyncbox.alert("【" + $("#tabs [att='" + i + "']").html() + '】的记录数与【' + $("#tabs [att='1']").html() + '】的记录数不一致，导入失败!', '提示');
                            Search(); //重新加载grid
                            parent.$.cover(false);
                            return;
                        }
                    }
                    //将grid按企业代码列进行排序，保证每个表的相同企业代码的记录在同一行。
                    for (i = 1; i <= rowcount; i++) {
                        var qybh = $(gridId1).getCell(i, "QYBH");
                        $(gridId2).setCell(i, "QYBH", qybh);
                        $(gridId3).setCell(i, "QYBH", qybh);
                        $(gridId4).setCell(i, "QYBH", qybh);
                        $(gridId5).setCell(i, "QYBH", qybh);
                        $(gridId6).setCell(i, "QYBH", qybh);
                        $(gridId7).setCell(i, "QYBH", qybh);
                    }
                    //保存一下。
                    funSave();
                    
                }
            });
        }

        function Search() {
            for (i = 1; i <= 7; i++) {
                $("#tableId"+i).setGridParam({ page: 1 });
                $("#tableId"+i).trigger("reloadGrid");
            }
        }

        function sort() {
            $(activeGridId).sortGrid('QYBH', false);
        }

        function funGridInit() {
            initGrid(gridId1, '#pageId1', [
                { label: '企业编号', name: 'QYBH', notnull: true, width: 100, editable: true, edittype: 'text' },
                { label: '企业名称', name: 'QYMC', notnull: true, width: 150, editable: true, edittype: 'text' },
                { label: '企业登记注册类型', name: 'DJZCLX', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '法人代表', name: 'FRDB', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '总经理', name: 'ZJL', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '企业地址', name: 'QYDZ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '邮编', name: 'YB', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '电话传真', name: 'DHCZ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '网址', name: 'WZ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { name: 'SubmitInfoID', formatter: 'snNumber', hidden: true }
   	            ], '/DataManage/Report/LTQYNB1_GetList', function () { flag1 = true; });

            initGrid(gridId2, '#pageId2', [
                { label: '企业编号', name: 'QYBH', notnull: true, width: 100, editable: false, edittype: 'text' },
                { label: '企业类型', name: 'QYLX', width: 150, editable: true, edittype: 'text' },
                { label: '开户行', name: 'KHH', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '信用等级', name: 'XYDJ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '资产负债率（%）', name: 'ZCFZL', width: 150, align: 'right', formatter: 'snNumber', sortable: false, editable: true, edittype: 'text' },
                { label: '是否上市', name: 'SFSSGS', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '上市时间', name: 'SSSJ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '股别', name: 'GB', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '股金总额', name: 'GJZE', formatter: 'snNumber', align: 'right', width: 150, align: 'right', sortable: false, editable: true, edittype: 'text' },
                { name: 'SubmitInfoID', formatter: 'snNumber', hidden: true }
   	            ], '/DataManage/Report/LTQYNB2_GetList', function () { flag2 = true; });

            initGrid(gridId3, '#pageId3', [
                { label: '企业编号', name: 'QYBH', notnull: true, width: 100, editable: true, edittype: 'text' },
                { label: '资产总额', name: 'ZCZE', formatter: 'snNumber', align: 'right', width: 150, editable: true, edittype: 'text' },
                { label: '固定资产', name: 'GDZC', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '去年销售收入', name: 'QNXSSR', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '今年销售收入', name: 'JNXSSR', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '成本利润率（%）', name: 'CBLRL', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '销售利润率（%）', name: 'XSLRL', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '去年利润总额', name: 'QNLRZE', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '今年利润总额', name: 'JNLRZE', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '今年上缴税金', name: 'JNSJSJ', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '增值税', name: 'ZZC', width: 150, formatter: 'snNumber', align: 'right', sortable: false, editable: true, edittype: 'text' },
                { label: '所得税', name: 'SDS', width: 150, formatter: 'snNumber', align: 'right', sortable: false, editable: true, edittype: 'text' },
                { name: 'SubmitInfoID', formatter: 'snNumber', hidden: true }
   	            ], '/DataManage/Report/LTQYNB3_GetList', function () { flag3 = true; });

            initGrid(gridId4, '#pageId4', [
                { label: '企业编号', name: 'QYBH', notnull: true, width: 100, editable: false, edittype: 'text' },
                { label: '主营产品原料类别', name: 'CPYLLB', width: 150, editable: true, edittype: 'text' },
                { label: '主营产品名称', name: 'CPMC', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '主营产品产量', name: 'CPCL', width: 150, formatter: 'snNumber', align: 'right', sortable: false, editable: true, edittype: 'text' },
                { label: '主营产品销售收入', name: 'CPXSSR', width: 150, formatter: 'snNumber', align: 'right', sortable: false, editable: true, edittype: 'text' },
                { label: '主营产品收入行业排名', name: 'CPXSSRHYPM', formatter: 'integer', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '产销率（%）', name: 'CXL', formatter: 'snNumber', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '国内市场占用率（%）', name: 'GNSCZYL', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '有否进出口经营权', name: 'YFJCKJYQ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '年创汇额', name: 'NCHE', width: 150, align: 'right', formatter: 'snNumber', sortable: false, editable: true, edittype: 'text' },
                { label: '创汇额行业排名', name: 'CHEDHYPM', formatter: 'integer', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '销售国别', name: 'XSGB', width: 150, sortable: false, editable: true, edittype: 'text' },
                { name: 'SubmitInfoID', formatter: 'snNumber', hidden: true }
   	            ], '/DataManage/Report/LTQYNB4_GetList', function () { flag4 = true; });

            initGrid(gridId5, '#pageId5', [
                { label: '企业编号', name: 'QYBH', notnull: true, width: 100, editable: false, edittype: 'text' },
                { label: '种值面积', name: 'ZZMJ', align: 'right', formatter: 'snNumber', width: 150, editable: true, edittype: 'text' },
                { label: '养殖量', name: 'YZL', align: 'right', formatter: 'integer', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '基在所在城市', name: 'JDSZCS', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '主要原料名称', name: 'ZYLMC', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '主要原料数量', name: 'ZYLSL', align: 'right', formatter: 'snNumber', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '采购占加工总量', name: 'CGZJGZL', align: 'right', formatter: 'snNumber', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '带动农户', name: 'DDNH', formatter: 'integer', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '合同制', name: 'HTZ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '合作制', name: 'HZZ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '股份合作制', name: 'GFHZZ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '其它', name: 'QT', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '是否保护价收购产品', name: 'SFBHJSGCP', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '是否提供系列化服务', name: 'SFTGXLHFW', width: 150, sortable: false, editable: true, edittype: 'text' },
                { name: 'SubmitInfoID', formatter: 'snNumber', hidden: true }
   	            ], '/DataManage/Report/LTQYNB5_GetList', function () { flag5 = true; });

            initGrid(gridId6, '#pageId6', [
                { label: '企业编号', name: 'QYBH', notnull: true, width: 100, editable: false, edittype: 'text' },
                { label: '有否专门研发机构', name: 'YFYFJG', align: 'center', width: 150, editable: true, edittype: 'text' },
                { label: '是否获省级奖励', name: 'YFHSJJL', align: 'center', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '是否新科技企业', name: 'SFXKJQY', align: 'center', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '是否有质检机构', name: 'YFZJJG', width: 150, align: 'center', sortable: false, editable: true, edittype: 'text' },
                { label: '是否有质量管理制度', name: 'YFZLGLZD', align: 'center', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '在历次抽检中是否合格', name: 'SFCJHE', align: 'center', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '是否为绿色产品', name: 'SFLSCP', align: 'center', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '是否达ISO要求', name: 'SFISOYQ', align: 'center', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '三废是否达标', name: 'SFSFDB', width: 150, align: 'center', sortable: false, editable: true, edittype: 'text' },
                { name: 'SubmitInfoID', formatter: 'snNumber', hidden: true }
   	            ], '/DataManage/Report/LTQYNB6_GetList', function () { flag6 = true; });

            initGrid(gridId7, '#pageId7', [
                { label: '企业编号', name: 'QYBH', notnull: true, width: 100, editable: false, edittype: 'text' },
                { label: '行业类别', name: 'HYLB', width: 150, editable: true, edittype: 'text' },
                { label: '所在城市', name: 'SZCS', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '认定时间', name: 'RDSJ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '总计', name: 'ZJ', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '博士', name: 'BS', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '硕士', name: 'SS', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '中级以上职称', name: 'ZJYSZC', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '中国名牌', name: 'ZGMP', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '驰名商标', name: 'CMSB', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '河南名牌', name: 'HNMP', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '著名商标', name: 'ZMSB', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '机构名称', name: 'JGMC', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '研发形式', name: 'YFXS', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '合作单位', name: 'HZDW', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '质量认证情况', name: 'ZLRZQK', width: 150, sortable: false, editable: true, edittype: 'text' },
                { label: '人均年增收', name: 'RJNZS', formatter: 'snNumber', align: 'right', width: 150, sortable: false, editable: true, edittype: 'text' },
                { name: 'SubmitInfoID', formatter: 'snNumber', hidden: true }
   	            ], '/DataManage/Report/LTQYNB7_GetList', function () { flag7 = true; });
        }

        function funSave() {
            $(gridId1).saveEdittingCell();
            $(gridId2).saveEdittingCell();
            $(gridId3).saveEdittingCell();
            $(gridId4).saveEdittingCell();
            $(gridId5).saveEdittingCell();
            $(gridId6).saveEdittingCell();
            $(gridId7).saveEdittingCell();
            var dataList1 = $(gridId1).getRowData();
            var dataList2 = $(gridId2).getRowData();
            var dataList3 = $(gridId3).getRowData();
            var dataList4 = $(gridId4).getRowData();
            var dataList5 = $(gridId5).getRowData();
            var dataList6 = $(gridId6).getRowData();
            var dataList7 = $(gridId7).getRowData();
            if (dataList1.length == 0 &&
            dataList2.length == 0 &&
            dataList3.length == 0 &&
            dataList4.length == 0 &&
            dataList5.length == 0 &&
            dataList6.length == 0 &&
            dataList7.length == 0) {
                alert('没有需要保存的数据');
                return;
            }
            var data = {
                submitInfoID: '@ViewBag.SubmitInfoID',
                dataList1: JSON.stringify(dataList1),
                dataList2: JSON.stringify(dataList2),
                dataList3: JSON.stringify(dataList3),
                dataList4: JSON.stringify(dataList4),
                dataList5: JSON.stringify(dataList5),
                dataList6: JSON.stringify(dataList6),
                dataList7: JSON.stringify(dataList7)
            };
            $.funAction('/DataManage/Report/Save_LTQYNB', data, function () {
                alert('保存成功');
            });
            parent.$.cover(false);
        }

        function addRow() {
            if (!flag1 || !flag2 || !flag3 || !flag4 || !flag5 || !flag6 || !flag7) {
                alert('还有表格正在载入数据，请稍后……');
                return;
            }
            var _data = {
                SubmitInfoID: '@ViewBag.SubmitInfoID'
            };
            var _rownum = $(gridId1).getDataIDs().length + 1;

            $(gridId1).addRowData(_rownum, _data);
            _rownum = $(gridId2).getDataIDs().length + 1;
            $(gridId2).addRowData(_rownum, _data);
            _rownum = $(gridId3).getDataIDs().length + 1;
            $(gridId3).addRowData(_rownum, _data);
            _rownum = $(gridId4).getDataIDs().length + 1;
            $(gridId4).addRowData(_rownum, _data);
            _rownum = $(gridId5).getDataIDs().length + 1;
            $(gridId5).addRowData(_rownum, _data);
            _rownum = $(gridId6).getDataIDs().length + 1;
            $(gridId6).addRowData(_rownum, _data);
            _rownum = $(gridId7).getDataIDs().length + 1;
            $(gridId7).addRowData(_rownum, _data);
        }

        function delRow() {
            var selectedId = $(activeGridId).jqGrid("getGridParam", "selarrrow");
            for (j = selectedId.length - 1; j >=0; j--) {
                var temp = selectedId[j];
                for (i = 1; i <= 7; i++)
                    $("#tableId" + i).jqGrid("delRowData", temp);
            }
        }

        function ExportReport() {
                    //农业产业化龙头企业季报
            //如果Organization_Level为0，则显示全部，传过去的参数为""值
            var url = '/DataManage/Report/ExportLTQYNB/@ViewBag.SubmitInfoID' + '?Organization_Level=' + ($("input[name='Organization_Level']:checked").eq(0).val() == '0' ? "" : $("input[name='Organization_Level']:checked").eq(0).val())
            window.location.href =url;
        }

        function initGrid(gridId, pagerId, colModel, url, func) {
            var option = {
                height: $("#divGridContainer").height() - 98,
                width: $("#divGridContainer").width() - 18,
                url: url, autowidth: false, multiselect: true,
                rowNum: 1000, cellEdit: true, cellsubmit: 'clientArray',
                datatype: "json", sortname: 'SubmitInfoID', sortorder: 'desc',
                colModel: colModel,
                onSelectRow: function (rowid, cellname, value, iRow, iCol) { _rowId = rowid; },
                ondblClickRow: function (rowid) { _rowId = rowid; },
                afterSaveCell: function (rowid, cellname, value, iRow, iCol, flag) {

                    $.goToNextCell(gridId, iRow, iCol, false);
                    if (cellname == "QYBH" && gridId == gridId1) {//当第一张表的企业编号修改时，同时修改其它表
                        var qybh = $(gridId).getCell(iRow, "QYBH");
                        $(gridId2).setCell(iRow, "QYBH", qybh);
                        $(gridId3).setCell(iRow, "QYBH", qybh);
                        $(gridId4).setCell(iRow, "QYBH", qybh);
                        $(gridId5).setCell(iRow, "QYBH", qybh);
                        $(gridId6).setCell(iRow, "QYBH", qybh);
                        $(gridId7).setCell(iRow, "QYBH", qybh);
                    }
                },
                beforeRequest: function (d) {
                    var data = { 'submitInfoId': '@ViewBag.SubmitInfoID' };
                    $(gridId).jqGrid('setGridParam', { postData: data });
                },
                loadComplete: function () {
                    //如果是龙头企业,并且没有录入过数据 ，则自动插入一行,并将企业
                    if (organization_type == '1' && edittype=='1' && $(gridId).jqGrid('getGridParam', 'reccount') == 0) {
                        var _rownum = $(gridId).getDataIDs().length + 1;
                        var _data = { SubmitInfoID: '@ViewBag.SubmitInfoID', QYMC: organization_name, QYBH: organization_id };
                        $(gridId).addRowData(_rownum, _data);
                    }
                    func();
                }
            };
            var o = jqGridHelper.getConfig(pagerId, option);
            $(gridId).jqGrid(o);
        }

    </script>
    }
    <div class="ui-layout-north" id='toolbar'>
        <div id="titlediv" class="headertitle">
        </div>
        <div style="float: right; margin-right: 20px; margin-top: 2px; line-height: 32px;">
            <div style="float: left;">
                <input type="file" name="btnImport" id="btnImport" class=" padding-top: 10px;" />
            </div>
 
                <a onclick="addRow();" class="button green" id="addRow"><span class="icon-botton"
                    style="background: url('/Content/16/hj.png') no-repeat scroll 0px 4px;"></span>新增</a>&nbsp;<a
                        onclick="delRow();" class="button green" id="delRow"><span class="icon-botton" style="background: url('/Content/16/hj.png') no-repeat scroll 0px 4px;"></span>删除</a>&nbsp;
                <a onclick="funSave();" class="button green" id="funSave"><span class="icon-botton"
                    style="background: url('/Content/16/hj.png') no-repeat scroll 0px 4px;"></span>保存</a>

        </div>

        <div style="float: right; margin-right: 5px; margin-top: 2px; line-height: 32px;">
        <div id="ChooseExportType" style="float: left;">
        <label>
            仅导出：</label>
        <input id="Organization_Level" name="Organization_Level" type="radio" value="0" checked="checked"/><label>全部</label>&nbsp;
        <input id="Organization_Level" name="Organization_Level" type="radio" value="1" /><label>国家级</label>&nbsp;
        <input id="Organization_Level" name="Organization_Level" type="radio" value="2" /><label>省级</label>&nbsp;
        <input id="Organization_Level" name="Organization_Level" type="radio" value="3" /><label>市级</label>
        </div>
        <div style="float: left;">
        <a onclick="ExportReport();" class="button green"><span class="icon-botton" style="background: url('/Content/16/hj.png') no-repeat scroll 0px 4px;">
        </span>导出</a>
        </div>
    </div>
    </div>
<div id="divGridContainer" class="ui-layout-center" style="overflow: hidden;">
    <form id="formData" method="post">
    <div id="tabs">
        <ul style="margin-left: 4px; margin-right: 4px;">
            <li><a href="#tabs-1" att="1">表1</a></li>
            <li><a href="#tabs-2" att="2">表2</a></li>
            <li><a href="#tabs-3" att="3">表3</a></li>
            <li><a href="#tabs-4" att="4">表4</a></li>
            <li><a href="#tabs-5" att="5">表5</a></li>
            <li><a href="#tabs-6" att="6">表6</a></li>
            <li><a href="#tabs-7" att="7">附表</a></li>
        </ul>
        <div id="tabs-1">
            <table id="tableId1">
            </table>
            <div id="pageId1">
            </div>
        </div>
        <div id="tabs-2">
            <table id="tableId2">
            </table>
            <div id="pageId2">
            </div>
        </div>
        <div id="tabs-3">
            <table id="tableId3">
            </table>
            <div id="pageId3">
            </div>
        </div>
        <div id="tabs-4">
            <table id="tableId4">
            </table>
            <div id="pageId4">
            </div>
        </div>
        <div id="tabs-5">
            <table id="tableId5">
            </table>
            <div id="pageId5">
            </div>
        </div>
        <div id="tabs-6">
            <table id="tableId6">
            </table>
            <div id="pageId6">
            </div>
        </div>
        <div id="tabs-7">
            <table id="tableId7">
            </table>
            <div id="pageId7">
            </div>
        </div>
    </div>
    </form>
</div>
